<form id="pagerForm" method="post" action="{:url('Ad/index')}">
    <input type="hidden" name="keyword" value="{$keyword}" />
    <input type="hidden" name="pageNum" value="{$page_num}" />
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="{:url('Ad/index')}" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        标题名称：<input type="text" name="keyword" value="{$keyword}" />
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a rel="ad_manage_add" class="add" href="{:url('Ad/add')}" target="dialog" width="500" height="300" title="添加广告"><span>添加</span></a></li>
            <li><a rel="ad_manage_modify" class="edit" href="{:url('Ad/modify')}?id={ad_id}" target="dialog" width="500" height="300" title="修改广告"><span>修改</span></a></li>
            <li><a class="delete" href="{:url('Ad/doDelete')}?id={ad_id}" target="ajaxTodo" title="确定要删除吗？"><span>删除</span></a></li>
        </ul>
    </div>
    <table class="table" width="101.8%" layoutH="132">
        <thead>
            <tr>
                <th width="12%">广告名称</th>
                <th width="10%">广告图片</th>
                <th width="8%">是否显示</th>
                <th width="10%">添加人</th>
                <th width="8%">排序</th>
                <th width="12%">创建时间</th>
                <th width="12%">修改时间</th>
            </tr>
        </thead>
        <tbody>
            {volist name="list" id="vo"}
                <tr target="ad_id" rel="{$vo.ad_id}">
                    <td>{$vo.ad_name}</td>
                    <td><a onclick="$(this).colorbox({height: 600});return false;" href="{$Think.config.image_url}/{$vo.ad_code}">查看图片</a></td>
                    <td>{switch name="vo.enabled"}{case value="1"}是{/case}{case value="0"}否{/case}{/switch}</td>
                    <td>{$vo.link_man}</td>
                    <td>{$vo.orderby}</td>
                    <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                    <td>{$vo.update_time|date='Y-m-d H:i:s',###}</td>
                </tr>
            {/volist}
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>共{$count}条</span>
        </div>
        <div class="pagination" targetType="adTab" totalCount="{$count}" numPerPage="{$num_per_page}" pageNumShown="10" currentPage="{$page_num}"></div>
    </div>
</div>
